package com.fuyin.dto.vo;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author yuanxilan (yuanxilan@keep.com)
 * @Description
 * @date 2021年11月13日 4:34 下午
 * @since
 */
@Data
@Api("风险控制报告")
@JsonIgnoreProperties(ignoreUnknown = true)
public class RiskReport implements Serializable {

    private static final long serialVersionUID = 241103897918267835L;
    private Long id;

    private GpDetails gpDetails;

    private List<Analysis> analysis;

    @Data
    public static class Analysis implements Serializable {

        private static final long serialVersionUID = -1968581517442420025L;

        @ApiModelProperty("类型，0表示营运能力分析，1表示盈利能力分析，2表示偿债能力分析，3表示担保能力分析")
        private int type;

        private List<ResultZbDto> resultZbDtos;

        @ApiModelProperty("存在的风险")
        private String risk;

        @ApiModelProperty("风险控制建议")
        private String advise;
    }

    @Data
    public static class ResultZbDto implements Serializable {

        private static final long serialVersionUID = 6527165325363676272L;

        @ApiModelProperty("指标")
        private String zbKey;

        @ApiModelProperty("最新值")
        private String newestValue;

        @ApiModelProperty("评估结果")
        private String evaluateResult;

        public ResultZbDto() {}

        public ResultZbDto(String zbKey, String newestValue) {
            this.zbKey = zbKey;
            this.newestValue = newestValue;
        }

        public ResultZbDto(String zbKey, String newestValue, String evaluateResult) {
            this.zbKey = zbKey;
            this.newestValue = newestValue;
            this.evaluateResult = evaluateResult;
        }
    }
}
